import request from '@/utils/request'

// 注册账号
export function register(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data,
  })
}

// 登录
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data,
  })
}

// 退出登录
export function logout() {
  return request({
    url: '/user/logout',
    method: 'get',
  })
}

// 注销账号
export function deleteUser() {
  return request({
    url: '/user/writeOff',
    method: 'get',
  })
}
